package com.sc.nft.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.sc.nft.entity.UserInfo;
import com.sc.nft.entity.dto.BusinessDTO;
import com.sc.nft.entity.dto.CreateTradingPoolOrderDTO;
import com.sc.nft.entity.dto.TradingPoolOrderDTO;
import com.sc.nft.entity.dto.TradingPoolTransactionRecordsDTO;
import com.sc.nft.entity.vo.CreateTradingPoolOrderVO;
import com.sc.nft.entity.vo.DingLianDealPracticalVO;
import com.sc.nft.entity.vo.TradingPoolTransactionRecordsVO;
import com.sc.nft.entity.vo.tradingPool.TradingPoolOrderDetailVO;
import com.sc.nft.entity.vo.tradingPool.TradingPoolOrderPageVO;
import com.sc.nft.entity.vo.tradingPool.TradingPoolOrderVO;

import java.util.Date;
import java.util.List;

/**
 * import com.sc.nft.entity.dto.CreateTradingPoolOrderDTO;
 * import com.sc.nft.entity.vo.CreateTradingPoolOrderVO;
 * import com.baomidou.mybatisplus.core.metadata.IPage;
 * import com.sc.nft.entity.vo.tradingPool.TradingPoolOrderVO;
 * <p>
 * import java.util.Date;
 *
 * @author PC
 * @description 针对表【sc_trading_pool_order(生态池订单表)】的数据库操作Service
 * @createDate 2024-10-26 13:55:50
 */
public interface TradingPoolOrderService {

    /**
     * 创建订单
     *
     * @return
     */
    CreateTradingPoolOrderVO createOrder(CreateTradingPoolOrderDTO createTradingPoolOrderDTO);

    /**
     * 获取买入交易记录
     *
     * @param pageNo     页码
     * @param pageSize   页码
     * @param searchDate 搜索时间
     * @param userId     用户id
     * @return TradingPoolOrderVO
     */
    IPage<TradingPoolOrderVO> pageTradeInOrder(Integer pageNo, Integer pageSize, Date searchDate, Long userId);


    /**
     * 获取卖出交易记录
     *
     * @param pageNo     页码
     * @param pageSize   页码
     * @param searchDate 搜索时间
     * @param userId     用户id
     * @return TradingPoolOrderVO
     */
    IPage<TradingPoolOrderVO> pageTradeOutOrder(Integer pageNo, Integer pageSize, Date searchDate, Long userId);

    /**
     * 买入卖出订单详情
     *
     * @param id 订单id
     * @return TradingPoolOrderDetailVO
     */
    TradingPoolOrderDetailVO tradeOrderDetail(Long id);

    /**
     * 获取交易记录
     * tradingPoolTransactionRecordsDTO
     *
     * @param tradingPoolTransactionRecordsDTO
     * @return
     */
    IPage<TradingPoolTransactionRecordsVO> pageTransactionRecords(TradingPoolTransactionRecordsDTO tradingPoolTransactionRecordsDTO);

    /**
     * 交易池订单记录
     *
     * @param request
     * @return
     */
    IPage<TradingPoolOrderPageVO> orderPage(TradingPoolOrderDTO request);

    /**
     * 买卖
     *
     * @param businessDTO
     * @param userInfo
     */
    void business(BusinessDTO businessDTO, UserInfo userInfo, String ip);

    List<DingLianDealPracticalVO> dealTradingPracticalInConsensus();

    List<DingLianDealPracticalVO> dealTradingPracticalNotInConsensus();

}
